/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author TQNINH
 */
interface A {
    final int id = 1;
    final String name = "diana";
}

class B implements A {
    int deptno;
}

public class TestClass {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        A objA = new B();
        B objB = new B();
        Class objX;
        
        objX = objA.getClass();
        System.out.println("objA is object of type: " + objX.getName());
        
        objX = objB.getClass();
        System.out.println("objB is object of type: " + objX.getName());
        
        objX = objX.getSuperclass();
        System.out.println("objB's superclass is: " + objX.getName());
    }
}
